import 'package:flutter/material.dart';

void main() => runApp(new MyApp());

class MyApp extends StatelessWidget {

  final  Map<String,  WidgetBuilder>  _routes  =  <String,  WidgetBuilder>{
    Navigator.defaultRouteName :  (context)  => new  MyHomePage(title:  'Flutter Demo Home Page') //默认路由
  };

  @override
  Widget build(BuildContext context) {
    return  new  MaterialApp(
      title:  'Flutter App',
      routes:  _routes,  // 使用 _routes 中定义的 默认路由来替代 home
    );
  }
}
